package com.book.manage.controller;

import com.book.manage.config.result.Result;
import com.book.manage.dto.LoginDTO;
import com.book.manage.entity.Admin;
import com.book.manage.service.LoginService;
import com.book.manage.vo.LoginVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.HashMap;
import java.util.Map;

@Controller
@RequestMapping("")
public class LoginController {
    @Autowired
    private LoginService loginService;
    @PostMapping("")
    public Result<LoginVO> Login(@RequestBody LoginDTO loginDTO){
        //首先是查询的时候记住老套路，有查询的时候就将其中的前端返回来的内容传递给实体类进行赋值
        Admin login = loginService.dengLU(loginDTO);
        //创建jwts
        Map<String ,Object> claims =new HashMap<>();
        claims.put();
        return  Result.success();
    }

}